package com.sayimo.maker.user.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.sayimo.framework.database.mybatis.AbstractMybatisBaseDao;
import com.sayimo.framework.exception.DaoException;
import com.sayimo.maker.user.dao.StartupGameDetailInterfaceDao;
import com.sayimo.maker.user.vo.StartupGameDetail;


@Repository(value="startupGameDetailInterfaceDao")
public class StartupGameDetailDaoImpl extends AbstractMybatisBaseDao<StartupGameDetail> implements StartupGameDetailInterfaceDao {

	@Override
	public Integer insertStartupGameDetail(StartupGameDetail startupGameDetail) throws DaoException {
		
		return this.mybatisInterfaceBaseDao.insert("com.sayimo.maker.user.dao.StartupGameDetailInterfaceDao.insertStartupGameDetail",startupGameDetail);
	}

	@Override
	public List<StartupGameDetail> selectStartupGameDetailById(Integer teamId) throws DaoException {
		
		return this.mybatisInterfaceBaseDao.query("com.sayimo.maker.user.dao.StartupGameDetailInterfaceDao.selectStartupGameDetailByTeamId",teamId);
	}

	@Override
	@Transactional(readOnly=false)
	public int updateStartupGameDetail(StartupGameDetail startupGameDetail) throws DaoException {
		
		return this.mybatisInterfaceBaseDao.update("com.sayimo.maker.user.dao.StartupGameDetailInterfaceDao.updateStartupGameDetail", startupGameDetail);
	}

}
